Received: from gate.ggr.co.uk (gate.ggr.co.uk [193.128.25.10]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id MAA18214 for <blitz-list@helsinki.fi>; Thu, 11 Aug 1994 12:59:34 +0300
Received: from mailhub.ggr.co.uk by gate.ggr.co.uk; Thu, 11 Aug 1994 10:58:05 +0100
Message-Id: <7454.199408110953@mailhub.ggr.co.uk>
Received: from UKSYSA.ggr.co.uk by mailhub.ggr.co.uk; Thu, 11 Aug 1994 10:53:15 +0100
From: Mr M L Funnell <mlf27308@ggr.co.uk>
Date: 11 Aug 94 10:46:00 BST
Subject: Cool way to swap...
To: blitz-list@helsinki.fi
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Status:
Status: RO
hi there,
just seen swapping routine in a PC Visual Basic manual at work and
wondered if anyone else knew of the routine.....
NORMAL SWAP Cool Swap
----------- ---------
temp = a a = a xor b
b = a b = b xor a
a = temp a = a xor b
This new routine actually gets rid of the 3rd variable and 'could' reduce
the processing time?? I problem is is that it can only work on numbers NOT